package com.fary.factorybean;

import com.fary.entity.Course;
import com.fary.entity.Student;

public class StudentFactory {
   //非静态方法
   public Student createStudent(String name, Course course){
       Student student = new Student();
       student.setName(name);
       student.setAge(12);
       return student;
   }
   
   //静态方法
   public static Student createStaticStudent(){
       Student student = new Student();
       student.setName("lisi");
       student.setAge(18);
       return student;
   }
}